package com.flow.asyncflow.core.utils.http;

import com.ejlchina.okhttps.HTTP;
import com.ejlchina.okhttps.fastjson.FastjsonMsgConvertor;
import org.springframework.context.annotation.Configuration;

@Configuration
public  class HttpConfig {

    public static HTTP getBaseHttp() {
        return HTTP.builder()
                .addMsgConvertor(new FastjsonMsgConvertor())
                .baseUrl("")

                .build();
    }

    public HTTP getSendMsgHttp() {
        return HTTP.builder()
                .baseUrl("http://api.example.com")
                .build();
    }

    public void test()
    {
        getSendMsgHttp().sync("");
    }
}
